package de.uni.kassel.campusappver3.view;



public class MapRtK {
	
	public static int[] getKoord(int roomNumber){
		int x = 20;
		int y = 43;
		int koord[] = new int[2];
		koord[0] = 1;
		koord[1] = 1;
		//ground floor
		if(roomNumber >= 428 && roomNumber <= 445 ){
			koord[0] = 172-x;
			koord[1] = 156-y;
		}
		if(roomNumber >= 417 && roomNumber <= 426 ){
			koord[0] = 157-x;
			koord[1] = 303-y;
		}
		if(roomNumber >= 406 && roomNumber <= 410 ){
			koord[0] = 175-x;
			koord[1] = 262-y;
		}
		if(roomNumber >= 326 && roomNumber <= 335 ){
			koord[0] = 300-x;
			koord[1] = 328-y;
			for (int i = 326; i < roomNumber; i++) {
				koord[0] = koord[0]+1;
				koord[1] = koord[1]-21;
			}
		}
		if(roomNumber >= 303 && roomNumber <= 315 ){
			koord[0] = 474-x;
			koord[1] = 145-y;
			for (int i = 303; i < roomNumber; i++) {
				koord[0] = koord[0]-1;
				koord[1] = koord[1]+16;
			}
		}
		if(roomNumber >= 101 && roomNumber <= 111 ){
			koord[0] = 771-x;
			koord[1] = 110-y;
		}
		if(roomNumber >= 113 && roomNumber <= 141 ){
			koord[0] = 700-x;
			koord[1] = 61-y;
			for (int i = 113; i < roomNumber; i++) {
				koord[0] = koord[0]-2;
				koord[1] = koord[1]+13;
			}
		}
		if(roomNumber >= 608 && roomNumber <= 651 ){
			koord[0] = 211-x;
			koord[1] = 493-y;
			for (int i = 608; i < roomNumber; i++) {
				koord[0] = koord[0]+4;
				koord[1] = koord[1]+2;
			}
		}
		if(roomNumber >= 607 && roomNumber <= 610 ){
			koord[0] = 148-x;
			koord[1] = 480-y;
		}
		//first floor
		if(roomNumber >= 1402 && roomNumber <= 1411 ){
			koord[0] = 175-x;
			koord[1] = 262-y;
		}
		if(roomNumber >= 1332 && roomNumber <= 1344 ){
			koord[0] = 300-x;
			koord[1] = 328-y;
			for (int i = 1332; i < roomNumber; i++) {
				koord[0] = koord[0]+1;
				koord[1] = koord[1]-16;
			}
		}
		if(roomNumber >= 1303 && roomNumber <= 1321 ){
			koord[0] = 474-x;
			koord[1] = 145-y;
			for (int i = 1303; i < roomNumber; i++) {
				koord[0] = koord[0]-1;
				koord[1] = koord[1]+11;
			}
		}
		if(roomNumber >= 1325 && roomNumber <= 1330 ){
			koord[0] = 435-x;
			koord[1] = 289-y;
			for (int i = 1325; i < roomNumber; i++) {
				koord[0] = koord[0]-20;
				koord[1] = koord[1]+1;
			}
		}
		if(roomNumber >= 1112 && roomNumber <= 1140 ){
			koord[0] = 700-x;
			koord[1] = 61-y;
			for (int i = 1112; i < roomNumber; i++) {
				koord[0] = koord[0]-2;
				koord[1] = koord[1]+13;
			}
		}
		if(roomNumber >= 1102 && roomNumber <= 1110 ){
			koord[0] = 771-x;
			koord[1] = 110-y;
		}
		if(roomNumber == 1603){
			koord[0] = 148-x;
			koord[1] = 480-y;
		}
		if(roomNumber >= 1611 && roomNumber <= 1646 ){
			koord[0] = 408-x;
			koord[1] = 591-y;
			for (int i = 1611; i < roomNumber; i++) {
				koord[0] = koord[0]-6;
				koord[1] = koord[1]-3;
			}
		}
		//second floor
		if(roomNumber >= 2402 && roomNumber <= 2417 ){
			koord[0] = 175-x;
			koord[1] = 262-y;
		}
		if(roomNumber >= 2332 && roomNumber <= 2348 ){
			koord[0] = 300-x;
			koord[1] = 328-y;
			for (int i = 2332; i < roomNumber; i++) {
				koord[0] = koord[0]+1;
				koord[1] = koord[1]-12;
			}
		}
		if(roomNumber >= 2322 && roomNumber <= 2330 ){
			koord[0] = 435-x;
			koord[1] = 289-y;
			for (int i = 2322; i < roomNumber; i++) {
				koord[0] = koord[0]-13;
				koord[1] = koord[1]+1;
			}
		}
		if(roomNumber >= 2303 && roomNumber <= 2315 ){
			koord[0] = 474-x;
			koord[1] = 145-y;
			for (int i = 2303; i < roomNumber; i++) {
				koord[0] = koord[0]-1;
				koord[1] = koord[1]+16;
			}
		}
		if(roomNumber >= 2104 && roomNumber <= 2129 ){
			koord[0] = 700-x;
			koord[1] = 61-y;
			for (int i = 2104; i < roomNumber; i++) {
				koord[0] = koord[0]-3;
				koord[1] = koord[1]+13;
			}
		}
		if(roomNumber >= 2603 && roomNumber <= 2631 ){
			koord[0] = 408-x;
			koord[1] = 591-y;
			for (int i = 2603; i < roomNumber; i++) {
				koord[0] = koord[0]-7;
				koord[1] = koord[1]-4;
			}
		}
		//basement floor
		if(roomNumber >= -1446 && roomNumber <= -1401 ){
			koord[0] = 172-x;
			koord[1] = 156-y;
		}
		if(roomNumber >= -1345 && roomNumber <= -1332 ){
			koord[0] = 315-x;
			koord[1] = 135-y;
			for (int i = -1345; i < roomNumber; i++) {
				koord[0] = koord[0]-1;
				koord[1] = koord[1]+15;
			}
		}
		if(roomNumber >= -1330 && roomNumber <= -1322 ){
			koord[0] = 435-x;
			koord[1] = 289-y;
			for (int i = -1330; i < roomNumber; i++) {
				koord[0] = koord[0]+13;
				koord[1] = koord[1]-1;
			}
		}
		if(roomNumber >= -1320 && roomNumber <= -1304 ){
			koord[0] = 460-x;
			koord[1] = 342-y;
			for (int i = -1320; i < roomNumber; i++) {
				koord[0] = koord[0]+1;
				koord[1] = koord[1]-12;
			}
		}
		if(roomNumber == -1201){
			koord[0] = 532-x;
			koord[1] = 292-y;
		}
		if(roomNumber >= -1525 && roomNumber <= -1511 ){
			koord[0] = 594-x;
			koord[1] = 498-y;
			for (int i = -1525; i < roomNumber; i++) {
				koord[0] = koord[0]-22;
				koord[1] = koord[1]-9;
			}
		}
		if(roomNumber == -1537){
			koord[0] = 321-x;
			koord[1] = 426-y;
		}
		if(roomNumber == -1538){
			koord[0] = 489-x;
			koord[1] = 498-y;
		}
		if(roomNumber >= -1607 && roomNumber <= -1605 ){
			koord[0] = 148-x;
			koord[1] = 480-y;
		}
		if(roomNumber >= -1646 && roomNumber <= -1612 ){
			koord[0] = 408-x;
			koord[1] = 591-y;
			for (int i = -1646; i < roomNumber; i++) {
				koord[0] = koord[0]-6;
				koord[1] = koord[1]-3;
			}
		}
		return koord;
		
	}


}
